Support IMAP accounts in delete-staged command#223
Conversation
roborev: Combined Review (
|
ef50564 to
865cfbe
Compare
IMAP source identifiers are URLs (imaps://user@host:port), not email addresses. When --account is an email, resolve via GetSourcesByIdentifierOrDisplayName and canonicalize to the stored identifier before comparing against manifest filters. Also moves DB open before account resolution so the lookup is available. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
When the --account value matches multiple syncable sources (e.g. both a Gmail and IMAP source share the same email), return an explicit ambiguity error listing all matches instead of silently picking the first one. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
|
thanks! I just did some roborev grinding, hopefully it still works |
Human note: this fixed my use case (processing a ton of iCloud-hosted emails). Code looks reasonable to me, but I don't know golang. iCloud (IMAP) path is tested, Gmail path is untested (I don't have a gmail).
===========
Summary
delete-stagednow detects account type and routes IMAP accounts through the IMAP client path instead of always assuming Gmail OAuthbuildAPIClientfactory (same one used by sync) to avoid duplicating IMAP client constructionCloses #221
Testing
Tested end-to-end on a real iCloud IMAP account:
UID STORE \Deleted+UID EXPUNGE.--dry-runworks correctly for IMAP accountsmake test)go fmtandgo vetclean